/**
 * 
 */
package com.wbcs.system.function;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.wbcs.config.component.application.report.ReportBean;
import com.wbcs.exception.WbcsRuntimeException;

/**
 * 函数上下文数据对象
 * @author hawkfly
 */
public class FuncContextBean {
	
	private ReportBean rbean;
	private IFunc ifunc;
	private Map<String, Object> mUpChainForwardPara = new HashMap<String, Object>();

	public FuncContextBean(ReportBean rbean, IFunc ifunc){
		if(rbean == null)
		{
			throw new WbcsRuntimeException("创建FuncContextBean对象时参数ReportBean不允许为空");
		}

		if(ifunc == null)
		{
			throw new WbcsRuntimeException("创建FuncContextBean对象时参数IFunc不允许为空");
		}

		this.rbean = rbean;
		this.ifunc = ifunc;
	}

	public void setForwardPara(String paraName, Object val){
		this.mUpChainForwardPara.put(paraName, val);
	}

	public Object getUpChainPara(String paraName){
		return this.mUpChainForwardPara.get(paraName);
	}

	public ReportBean getRbean() {
		return rbean;
	}

	public IFunc getIfunc() {
		return ifunc;
	}
}
